<template>
  <div class="fullscreen">
    <el-tooltip :content="tip">
      <i :class="['iconfont', isFullscreen ? 'icon-suoxiao' : 'icon-fangda']" class="toolBar-icon" @click="toggle"></i>
    </el-tooltip>
  </div>
</template>

<script setup lang="ts">
import { useFullscreen } from "@vueuse/core";
import { computed } from "vue";
const { toggle, isFullscreen } = useFullscreen();

const tip = computed(() => {
  return isFullscreen.value ? " 退出全屏" : "全屏";
});
</script>
